package com.all.play.myapplication.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.widget.ImageView;
import android.widget.TextView;

import com.all.play.myapplication.R;
import com.bumptech.glide.Glide;
import com.jaeger.library.StatusBarUtil;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by 聪明一只哈 on 2018/4/19.
 * Time: 2018/4/19  13:43
 */

public class ProductDetialActivity extends AppCompatActivity {
    @BindView(R.id.image_pd_detial)
    ImageView imagePdDetial;
    @BindView(R.id.tv_del_name)
    TextView tvDelName;
    @BindView(R.id.tv_del_prices)
    TextView tvDelPrices;
    @BindView(R.id.tv_del_number)
    TextView tvDelNumber;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_pudt_detial);
        ButterKnife.bind(this);
        StatusBarUtil.setTranslucentForImageViewInFragment(this, null);

        String pdut_name = getIntent().getStringExtra("pdut_name");
        String pdut_number = getIntent().getStringExtra("pdut_number");
        String pdut_price = getIntent().getStringExtra("pdut_price");
        String pdut_figuer = getIntent().getStringExtra("pdut_figuer");

        Log.i("ProductDetial", "onCreate: " + pdut_name + "~" + pdut_number + "~" + pdut_price + "~" + pdut_figuer);
        //Toast.makeText(ProductDetialActivity.this, "" + pdut_name + "~" + pdut_number + "~" + pdut_price + "~" + pdut_figuer, Toast.LENGTH_SHORT).show();


        if (pdut_name!=null&&pdut_number!=null&&pdut_price!=null&&pdut_figuer!=null){
            Glide.with(this).load(pdut_figuer).into(imagePdDetial);
            tvDelName.setText("名称:"+pdut_name);
            tvDelPrices.setText("价格:"+pdut_price);
            tvDelNumber.setText(pdut_number);
        }

    }
}
